Skip to content

Add console setup helper#1712

Merged
gsanchietti merged 5 commits into
mainfrom
filippo-setup-console-88
Jun 18, 2026
Merged

Add console setup helper#1712
gsanchietti merged 5 commits into
mainfrom
filippo-setup-console-88

Conversation

@filippocarletti

@filippocarletti filippocarletti commented Jun 5, 2026

Copy link
Copy Markdown
Member

Summary

Add a whiptail-based /usr/sbin/setup helper for first-console
configuration of keymap, LAN, and WAN settings.

Related issue

Closes #1735 (Feature: Console setup helper for initial configuration)

How to test

  1. Open /usr/sbin/setup on the local console.
  2. Change the keymap between it and us and confirm it is applied
    immediately.
  3. Change the LAN IP within the current subnet and confirm the existing
    interface name is preserved.
  4. Configure WAN as dhcp or static and confirm only the changed side
    is rewritten.
  5. Run Apply without changes and confirm no network config is touched.

Dependencies

None.

@filippocarletti filippocarletti self-assigned this Jun 5, 2026
Base automatically changed from nethsecurity-8.8 to main June 8, 2026 13:29
@filippocarletti filippocarletti force-pushed the filippo-setup-console-88 branch from af784a3 to f3a6e02 Compare June 9, 2026 10:09
Add a whiptail-based /usr/sbin/setup helper for first-console\nconfiguration of keymap, LAN, and WAN settings. The helper\nreuses the local rpcd handlers, preserves existing interface names,\nand avoids rewriting unchanged network configuration.

Assisted-by: OpenCode:openai/gpt-5.4
@Tbaile Tbaile force-pushed the filippo-setup-console-88 branch from f3a6e02 to 1a11fba Compare June 15, 2026 14:12
filippocarletti and others added 2 commits June 18, 2026 13:23
Support LAN DHCP, expose logical LAN/WAN interface selection,
guide WAN static configuration, and strengthen IPv4/CIDR
validation in the console setup helper.
Keep keymap changes immediate and avoid rewriting unchanged
network state during no-op applies.

Assisted-by: OpenCode:openai/gpt-5.4
Changes:
- confirm exit when there are unsaved network changes
- validate IP/CIDR input immediately on entry, re-prompt on error
- split network menu into interface selection and configuration pages
- move apply changes item under network menu
- improve labels
- rename Cancel buttons to Back in sub-menus and Exit in main menu

Assisted-by: Copilot/Various models
@gsanchietti gsanchietti force-pushed the filippo-setup-console-88 branch from 1a11fba to b035db2 Compare June 18, 2026 11:26
@gsanchietti gsanchietti requested a review from Copilot June 18, 2026 11:36
@gsanchietti gsanchietti marked this pull request as ready for review June 18, 2026 11:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new console-first configuration helper (/usr/sbin/setup) to guide initial device setup (keymap + basic LAN/WAN configuration) using a whiptail UI, and wires it into the image via the ns-api package and documentation.

Changes:

  • Add whiptail dependency and install a new /usr/sbin/setup helper via ns-api.
  • Implement a whiptail-driven setup flow that reads current config via ns.devices/UCI and applies updates via ns.devices + ns.commit.
  • Document the new console setup helper in the quickstart guide.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
packages/ns-api/Makefile Adds whiptail dependency and installs the new /usr/sbin/setup script.
packages/ns-api/files/setup New interactive console setup script for keymap + LAN/WAN configuration via RPCD/UCI.
docs/quickstart.md Documents the availability and scope of /usr/sbin/setup.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/ns-api/files/setup Outdated
Comment thread packages/ns-api/files/setup
Comment thread packages/ns-api/files/setup
Comment thread packages/ns-api/files/setup Outdated
Comment thread packages/ns-api/files/setup
gsanchietti and others added 2 commits June 18, 2026 13:50
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@gsanchietti gsanchietti requested a review from Tbaile June 18, 2026 11:53

@Tbaile Tbaile left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤷

@gsanchietti

Copy link
Copy Markdown
Member

Related issue

Created #1735 (Feature: Console setup helper for initial configuration) to track this work.

Test cases have been prepared in the issue; they should be executed before merging this PR.

@gsanchietti gsanchietti merged commit 5b9e19d into main Jun 18, 2026
3 checks passed
@gsanchietti gsanchietti deleted the filippo-setup-console-88 branch June 18, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Console setup helper for initial configuration

4 participants